package com.palm.core.ui.tags;

import com.jfinal.template.Directive;
import com.jfinal.template.Env;
import com.jfinal.template.io.Writer;
import com.jfinal.template.stat.Scope;
import org.noear.solon.core.handle.Context;

public class ContentTypeTag extends Directive {
    @Override
    public void exec(Env env, Scope scope, Writer writer) {
        String contentType=(String) exprList.getFirstExpr().eval(scope);
        Context ctx=Context.current();
        if(ctx!=null){
            ctx.contentType(contentType);
        }
        System.out.println("setContentType:"+contentType);
    }
}
